

const priceLimitCol = [
    {
        title: '日期',
        dataIndex: 'date',
        key: 'date',
    }, {
        title: '方向',
        dataIndex: 'direction',
        key: 'direction',
    }, {
        title: '市场',
        dataIndex: 'market',
        key: 'market',
    }, {
        title: '价格',
        dataIndex: 'price',
        key: 'price',
    }, {
        title: '委托量/已完成',
        dataIndex: 'commissionedQuantity',
        key: 'commissionedQuantity',
    }, {
        title: '止盈/止损',
        dataIndex: 'takeProfitStopLoss',
        key: 'takeProfitStopLoss',
    }, {
        title: '冰山显示数量',
        dataIndex: 'icebergQuantity',
        key: 'icebergQuantity',
    }, {
        title: '总额/已完成',
        dataIndex: 'total',
        key: 'total',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const profitLossCol = [
    {
        title: '日期',
        dataIndex: 'date',
        key: 'date',
    }, {
        title: '方向',
        dataIndex: 'direction',
        key: 'direction',
    }, {
        title: '市场',
        dataIndex: 'market',
        key: 'market',
    }, {
        title: '触发价',
        dataIndex: 'targetPrice',
        key: 'targetPrice',
    }, {
        title: '委托价',
        dataIndex: 'entrustedPrice',
        key: 'entrustedPrice',
    }, {
        title: '委托量',
        dataIndex: 'commissionedQuantity',
        key: 'commissionedQuantity',
    }, {
        title: '有效期',
        dataIndex: 'termOfValidity',
        key: 'termOfValidity',
    }, {
        title: '止盈/止损',
        dataIndex: 'takeProfitStopLoss',
        key: 'takeProfitStopLoss',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const timeSharingCommissionCol = [
    {
        title: '日期',
        dataIndex: 'date',
        key: 'date',
    }, {
        title: '方向',
        dataIndex: 'direction',
        key: 'direction',
    }, {
        title: '市场',
        dataIndex: 'market',
        key: 'market',
    }, {
        title: '委托总量/已成交量',
        dataIndex: 'commTotalQuantity',
        key: 'commTotalQuantity',
    }, {
        title: '时间间隔',
        dataIndex: 'timeInterval',
        key: 'timeInterval',
    }, {
        title: '委托价优于盘口',
        dataIndex: 'betterThan',
        key: 'betterThan',
    }, {
        title: '单笔数量',
        dataIndex: 'perNumber',
        key: 'perNumber',
    }, {
        title: '总时长',
        dataIndex: 'totalDuration',
        key: 'totalDuration',
    }, {
        title: '激活价格',
        dataIndex: 'activatePrice',
        key: 'activatePrice',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const icebergStrategyCol = [
    {
        title: '日期',
        dataIndex: 'date',
        key: 'date',
    }, {
        title: '方向',
        dataIndex: 'direction',
        key: 'direction',
    }, {
        title: '市场',
        dataIndex: 'market',
        key: 'market',
    }, {
        title: '委托价优于盘口',
        dataIndex: 'betterThan',
        key: 'betterThan',
    }, {
        title: '激活价格',
        dataIndex: 'activatePrice',
        key: 'activatePrice',
    }, {
        title: '单笔数量',
        dataIndex: 'perNumber',
        key: 'perNumber',
    }, {
        title: '委托总量/已成交量',
        dataIndex: 'commTotalQuantity',
        key: 'commTotalQuantity',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }

]

const circularDelegationCol = [
    {
        title: '日期',
        dataIndex: 'date',
        key: 'date',
    }, {
        title: '方向',
        dataIndex: 'direction',
        key: 'direction',
    }, {
        title: '市场',
        dataIndex: 'market',
        key: 'market',
    }, {
        title: '委托价',
        dataIndex: 'entrustedPrice',
        key: 'entrustedPrice',
    }, {
        title: '止盈比例',
        dataIndex: 'profitTakingRatio',
        key: 'profitTakingRatio',
    }, {
        title: '止损比例',
        dataIndex: 'stopLossRatio',
        key: 'stopLossRatio',
    }, {
        title: '止损后暂停时间',
        dataIndex: 'pauseTime',
        key: 'pauseTime',
    }, {
        title: '委托量',
        dataIndex: 'commissionedQuantity',
        key: 'commissionedQuantity',
    }, {
        title: '总循环次数',
        dataIndex: 'totalNumberOfCycles',
        key: 'totalNumberOfCycles',
    }, {
        title: '有效期',
        dataIndex: 'termOfValidity',
        key: 'termOfValidity',
    }, {
        title: '状态',
        dataIndex: 'status',
        key: 'status',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const trackOrdersCol = [
    {
        title: '日期',
        dataIndex: 'date',
        key: 'date',
    }, {
        title: '方向',
        dataIndex: 'direction',
        key: 'direction',
    }, {
        title: '市场',
        dataIndex: 'market',
        key: 'market',
    }, {
        title: '激活价格',
        dataIndex: 'activatePrice',
        key: 'activatePrice',
    }, {
        title: '回调幅度',
        dataIndex: 'callbackAmplitude',
        key: 'callbackAmplitude',
    }, {
        title: '委托价',
        dataIndex: 'entrustedPrice',
        key: 'entrustedPrice',
    }, {
        title: '委托量',
        dataIndex: 'commissionedQuantity',
        key: 'commissionedQuantity',
    }, {
        title: '有效期',
        dataIndex: 'termOfValidity',
        key: 'termOfValidity',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

export function getInStockTableColumns(value) {
    if (value.includes('限价 | 市价')) {
        return priceLimitCol
    } else if (value.includes('止盈止损')) {
        return profitLossCol
    } else if (value.includes('分时委托')) {
        return timeSharingCommissionCol
    } else if (value.includes('冰山策略')) {
        return icebergStrategyCol
    } else if (value.includes('循环委托')) {
        return circularDelegationCol
    } else if (value.includes('追踪订单')) {
        return trackOrdersCol
    }
}

import { language } from '@/content-scripts/locales'

export const stockTransacRecordCol = [
    {
        title: language.quantity,
        dataIndex: 'market',
        key: 'market',
    },
    {
        title: language.time,
        dataIndex: 'createTime',
        key: 'createTime',
        customRender: ({ text }) => formatTimestamp(text)
    },
    {
        title: language.averageEntryPrice,
        dataIndex: 'entryPrice',
        key: 'entryPrice',
        customRender: ({ text }) => priceRender(text)
    }, {
        title: language.averageExitPrice,
        dataIndex: 'closePrice',
        key: 'closePrice',
        customRender: ({ text }) => priceRender(text)
    }, {
        title: language.closeType,
        dataIndex: 'closeReason',
        key: 'closeReason',
        customRender: ({ text }) => closeReasonRender(text)
    }, {
        title: language.coinQuantity,
        dataIndex: 'size',
        key: 'size',
    }, {
        title: language.margin,
        dataIndex: 'margin',
        key: 'margin',
        customRender: ({ text }) => marginRender(text)
    }, {
        title: language.returnAmount,
        dataIndex: 'profit',
        key: 'profit',
        customRender: ({ text }) => profitRender(text)
    }, {
        title: language.return,
        dataIndex: 'profitRate',
        key: 'profitRate',
        customRender: ({ text }) => profitRateRender(text)
    }
]


const formatTimestamp = (timestamp) => {
    const date = new Date(timestamp * 1000) // 注意时间戳是秒级需乘以1000
    return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}:${date.getSeconds().toString().padStart(2, '0')}`
}

const closeReasonRender = () => {
    return '-'
}

const priceRender = (value) => {
    return `${Number(value).toFixed(3)}`
}

const marginRender = (value) => {
    return `${Number(value).toFixed(2)}`
}

const profitRender = (value) => {
    if (language.lang == 'zh') {
        if (Number(value) > 0) {
            return <span style="color: red;">{Number(value).toFixed(2)}</span>
        } else {
            return <span style="color: green;">{Number(value).toFixed(2)}</span>
        }
    } else {
        if (Number(value) > 0) {
            return <span style="color: green;">{Number(value).toFixed(2)}</span>
        } else {
            return <span style="color: red;">{Number(value).toFixed(2)}</span>
        }
    }
}

const profitRateRender = (value) => {
    if (language.lang == 'zh') {
        if (Number(value) > 0) {
            return <span style="color: red;">{(Number(value) * 100).toFixed(2)}%</span>
        } else {
            return <span style="color: green;">{(Number(value) * 100).toFixed(2)}%</span>
        }
    } else {
        if (Number(value) > 0) {
            return <span style="color: green;">{(Number(value) * 100).toFixed(2)}%</span>
        } else {
            return <span style="color: red;">{(Number(value) * 100).toFixed(2)}%</span>
        }
    }
}


export const holdsAsseTableCol = [
    {
        title: language.coin,
        dataIndex: 'coinName',
        key: 'coinName',
        customRender: ({ text, record }) => coinNameRender(text, record)
    },
    {
        title: language.price,
        dataIndex: 'coinPrice',
        key: 'coinPrice',
        customRender: ({ text }) => coinPriceRender(text)
    },
    {
        title: language.assets,
        dataIndex: 'coinAsset',
        key: 'coinAsset',
        customRender: ({ text, record }) => coinAssetRender(text, record)
    },
    {
        title: language.coin,
        dataIndex: 'coinName',
        key: 'coinName'
    }
]

const coinPriceRender = (value) => {
    return `$${value}`
}

const coinAssetRender = (value, record) => {
    return Number(value) * Number(record.coinAsset)
}

    
    
const coinNameRender = (value,record)=>{
    return <div style="display: flex; justify-content: flex-start; align-items: center;">
        <img style="width: 24px; height: 24px; margin-right: 8px;" src={record.logoUrl}></img>
        <div>{value}</div>
    </div>
}

export function getTransacTobotColList(value) {
    if (value.includes('现货网格') || value.includes('杠杆网格') || value.includes('无限网格')) {
        return stockTransacRobotCol
    } else if (value.includes('合约网格')) {
        return stockContractNetworkCol
    } else if (value.includes('智能调仓')) {
        return IntelligentWarehouseCol
    } else if (value.includes('现货马丁格尔')) {
        return stockSpotMartingaleCol
    } else if (value.includes('组合指标')) {
        return stockCombinedIndicatorCol
    } else if (value.includes('期现套利')) {
        return futuresSpotArbitrageCol
    } else if (value.includes('合约马丁格尔')) {
        return stockContractMartingaleCol
    } else if (value.includes('信号机器人')) {
        return stockSignalRobotCol
    } else if (value.includes('跨所套利')) {
        return crossExchangeArbitrageCol
    } else if (value.includes('极速定投')) {
        return rapidFixedInvestmentCol
    } else if (value.includes('高价卖币')) {
        return sellCoinsAtHighPriceCol
    } else if (value.includes('折扣买币')) {
        return discountForBuyCoinsCol
    } else if (value.includes('逃顶宝')) {
        return escapeTreasureCol
    } else if (value.includes('抄底宝')) {
        return bottomTreasureCol
    }
}

const bottomTreasureCol = [
    {
        title: '产品名称',
        dataIndex: 'productName',
        key: 'productName',
    }, {
        title: '保证比例',
        dataIndex: 'guaranteeRatio',
        key: 'guaranteeRatio',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '买入价',
        dataIndex: 'buyingRate',
        key: 'buyingRate',
    }, {
        title: '预估收益',
        dataIndex: 'estimatedRevenue',
        key: 'estimatedRevenue',
    }, {
        title: '到期日',
        dataIndex: 'dueDate',
        key: 'dueDate',
    }, {
        title: '持币天数',
        dataIndex: 'holdCoinsDays',
        key: 'holdCoinsDays',
    }, {
        title: '结算价格',
        dataIndex: 'settlementPrice',
        key: 'settlementPrice',
    }
]

const escapeTreasureCol = [
    {
        title: '产品名称',
        dataIndex: 'productName',
        key: 'productName',
    }, {
        title: '保证比例',
        dataIndex: 'guaranteeRatio',
        key: 'guaranteeRatio',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '卖出价',
        dataIndex: 'sellingRate',
        key: 'sellingRate',
    }, {
        title: '预估收益',
        dataIndex: 'estimatedRevenue',
        key: 'estimatedRevenue',
    }, {
        title: '到期日',
        dataIndex: 'dueDate',
        key: 'dueDate',
    }, {
        title: '持币天数',
        dataIndex: 'holdCoinsDays',
        key: 'holdCoinsDays',
    }, {
        title: '结算价格',
        dataIndex: 'settlementPrice',
        key: 'settlementPrice',
    }
]

const discountForBuyCoinsCol = [
    {
        title: '产品名称',
        dataIndex: 'productName',
        key: 'productName',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '买入价',
        dataIndex: 'buyingRate',
        key: 'buyingRate',
    }, {
        title: '收益额',
        dataIndex: 'income',
        key: 'income',
    }, {
        title: '到期日',
        dataIndex: 'dueDate',
        key: 'dueDate',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '持币天数',
        dataIndex: 'holdCoinsDays',
        key: 'holdCoinsDays',
    }, {
        title: '结算价格',
        dataIndex: 'settlementPrice',
        key: 'settlementPrice',
    }
]

const sellCoinsAtHighPriceCol = [
    {
        title: '产品名称',
        dataIndex: 'productName',
        key: 'productName',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '卖出价',
        dataIndex: 'sellingRate',
        key: 'sellingRate',
    }, {
        title: '收益额',
        dataIndex: 'income',
        key: 'income',
    }, {
        title: '到期日',
        dataIndex: 'dueDate',
        key: 'dueDate',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '持币天数',
        dataIndex: 'holdCoinsDays',
        key: 'holdCoinsDays',
    }, {
        title: '结算价格',
        dataIndex: 'settlementPrice',
        key: 'settlementPrice',
    }
]

const rapidFixedInvestmentCol = [
    {
        title: '组合',
        dataIndex: 'combination',
        key: 'combination',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '投资币种',
        dataIndex: 'investmentCurrency',
        key: 'investmentCurrency',
    }, {
        title: '每期定投',
        dataIndex: 'reInvestPerPeriod',
        key: 'reInvestPerPeriod',
    }, {
        title: '昨日收益',
        dataIndex: 'yesterdayEarnings',
        key: 'yesterdayEarnings',
    }, {
        title: '持有收益',
        dataIndex: 'holdingGain',
        key: 'holdingGain',
    }, {
        title: '累计期数',
        dataIndex: 'accumulateNumPeriods',
        key: 'accumulateNumPeriods',
    }, {
        title: '累计定投',
        dataIndex: 'accumulateFixInvest',
        key: 'accumulateFixInvest',
    }, {
        title: '状态',
        dataIndex: 'status',
        key: 'status',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const crossExchangeArbitrageCol = [
    {
        title: '机器人名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '套利组合',
        dataIndex: 'arbitragePortfolio',
        key: 'arbitragePortfolio',
    }, {
        title: '套利开仓成本',
        dataIndex: 'arbitrageOpeningCost',
        key: 'arbitrageOpeningCost',
    }, {
        title: '套利持仓收益',
        dataIndex: 'ArbitragePositionIncome',
        key: 'ArbitragePositionIncome',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '实际开仓价差率',
        dataIndex: 'actualOpenSpreadRate',
        key: 'actualOpenSpreadRate',
    }, {
        title: '运行时长',
        dataIndex: 'runningTime',
        key: 'runningTime',
    }, {
        title: '距离交割剩余时长',
        dataIndex: 'reTimeUntilDelivery',
        key: 'reTimeUntilDelivery',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const stockSignalRobotCol = [
    {
        title: '机器人名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '总收益',
        dataIndex: 'totalRevenue',
        key: 'totalRevenue',
    }, {
        title: '浮动盈亏',
        dataIndex: 'floatingPL',
        key: 'floatingPL',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '运行时长',
        dataIndex: 'runningTime',
        key: 'runningTime',
    }, {
        title: '交易次数',
        dataIndex: 'numberTransactions',
        key: 'numberTransactions',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const stockContractMartingaleCol = [
    {
        title: '机器人名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '持仓量',
        dataIndex: 'openInterest',
        key: 'openInterest',
    }, {
        title: '保证金',
        dataIndex: 'bond',
        key: 'bond',
    }, {
        title: '总收益',
        dataIndex: 'totalRevenue',
        key: 'totalRevenue',
    }, {
        title: '已实现盈亏',
        dataIndex: 'realizedProfitLoss',
        key: 'realizedProfitLoss',
    }, {
        title: '浮动盈亏',
        dataIndex: 'floatingPL',
        key: 'floatingPL',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '预估强平价',
        dataIndex: 'estimatedStrongParity',
        key: 'estimatedStrongParity',
    }, {
        title: '保证金率',
        dataIndex: 'marginRatio',
        key: 'marginRatio',
    }, {
        title: '已加仓次数/最大加仓次数',
        dataIndex: 'warehouseAddedNum',
        key: 'warehouseAddedNum',
    }, {
        title: '本轮止盈价格/本轮止损价格',
        dataIndex: 'roundProfitLossPrice',
        key: 'roundProfitLossPrice',
    }, {
        title: '平均持仓成本',
        dataIndex: 'averageHoldingCost',
        key: 'averageHoldingCost',
    }, {
        title: '运行时长',
        dataIndex: 'runningTime',
        key: 'runningTime',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const futuresSpotArbitrageCol = [
    {
        title: '机器人名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易市场',
        dataIndex: 'tradingMarket',
        key: 'tradingMarket',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '总收益',
        dataIndex: 'totalRevenue',
        key: 'totalRevenue',
    }, {
        title: '套利收益',
        dataIndex: 'arbitrageIncome',
        key: 'arbitrageIncome',
    }, {
        title: '浮动盈亏',
        dataIndex: 'floatingPL',
        key: 'floatingPL',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '运行时长',
        dataIndex: 'runningTime',
        key: 'runningTime',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const stockCombinedIndicatorCol = [
    {
        title: '机器人名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '周期',
        dataIndex: 'cycle',
        key: 'cycle',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '总收益',
        dataIndex: 'totalRevenue',
        key: 'totalRevenue',
    }, {
        title: '已实现盈亏',
        dataIndex: 'realizedProfitLoss',
        key: 'realizedProfitLoss',
    }, {
        title: '未实现盈亏',
        dataIndex: 'unrealizedProfitLoss',
        key: 'unrealizedProfitLoss',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '运行时长',
        dataIndex: 'runningTime',
        key: 'runningTime',
    }, {
        title: '交易次数',
        dataIndex: 'numberTransactions',
        key: 'numberTransactions',
    }, {
        title: '交易胜率',
        dataIndex: 'tradingWinRate',
        key: 'tradingWinRate',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const stockSpotMartingaleCol = [
    {
        title: '机器人名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '总收益',
        dataIndex: 'totalRevenue',
        key: 'totalRevenue',
    }, {
        title: '浮动盈亏',
        dataIndex: 'floatingPL',
        key: 'floatingPL',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '已加仓次数/最大加仓次数',
        dataIndex: 'warehouseAddedNum',
        key: 'warehouseAddedNum',
    }, {
        title: '本轮止盈价格',
        dataIndex: 'roundProfitPrice',
        key: 'roundProfitPrice',
    }, {
        title: '平均持仓成本',
        dataIndex: 'averageHoldingCost',
        key: 'averageHoldingCost',
    }, {
        title: '运行时长',
        dataIndex: 'runningTime',
        key: 'runningTime',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const IntelligentWarehouseCol = [
    {
        title: '机器人名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易市场',
        dataIndex: 'tradingMarket',
        key: 'tradingMarket',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '总收益',
        dataIndex: 'totalRevenue',
        key: 'totalRevenue',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '运行时长',
        dataIndex: 'runningTime',
        key: 'runningTime',
    }, {
        title: '交易次数',
        dataIndex: 'transacNumber',
        key: 'transacNumber',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const stockContractNetworkCol = [
    {
        title: '机器人名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '总收益',
        dataIndex: 'totalRevenue',
        key: 'totalRevenue',
    }, {
        title: '网络收益',
        dataIndex: 'networkRevenue',
        key: 'networkRevenue',
    }, {
        title: '浮动盈亏',
        dataIndex: 'floatingPL',
        key: 'floatingPL',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '预估强平价',
        dataIndex: 'estimatedStrongParity',
        key: 'estimatedStrongParity',
    }, {
        title: '保证金率',
        dataIndex: 'marginRatio',
        key: 'marginRatio',
    }, {
        title: '运行时长',
        dataIndex: 'runningTime',
        key: 'runningTime',
    }, {
        title: '交易次数',
        dataIndex: 'transacNumber',
        key: 'transacNumber',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

const stockTransacRobotCol = [
    {
        title: '机器人名称',
        dataIndex: 'name',
        key: 'name',
    }, {
        title: '创建时间',
        dataIndex: 'createTime',
        key: 'createTime',
    }, {
        title: '交易对',
        dataIndex: 'tradingPairs',
        key: 'tradingPairs',
    }, {
        title: '投资额',
        dataIndex: 'investmentAmount',
        key: 'investmentAmount',
    }, {
        title: '总收益',
        dataIndex: 'totalRevenue',
        key: 'totalRevenue',
    }, {
        title: '网络收益',
        dataIndex: 'networkRevenue',
        key: 'networkRevenue',
    }, {
        title: '浮动盈亏',
        dataIndex: 'floatingPL',
        key: 'floatingPL',
    }, {
        title: '年化收益率',
        dataIndex: 'annualizedReturn',
        key: 'annualizedReturn',
    }, {
        title: '运行时长',
        dataIndex: 'runningTime',
        key: 'runningTime',
    }, {
        title: '交易次数',
        dataIndex: 'transacNumber',
        key: 'transacNumber',
    }, {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
    }
]

export const stockAssetCol = [
    {
        title: "币种",
        dataIndex: "currency",
        key: "currency",
    }, {
        title: "币种余额",
        dataIndex: "currencyBalance",
        key: "currencyBalance",
    }, {
        title: "可用余额",
        dataIndex: "availableBalance",
        key: "availableBalance",
    }, {
        title: "冻结",
        dataIndex: "freeze",
        key: "freeze",
    }, {
        title: "操作",
        dataIndex: "action",
        key: "action",
    }
]

export const currentBorrowingCol = [
    {
        title: "币种",
        dataIndex: "currency",
        key: "currency",
    }, {
        title: "市场",
        dataIndex: "market",
        key: "market",
    }, {
        title: "借款日利率（浮动）",
        dataIndex: "loanDailyInterestRate",
        key: "loanDailyInterestRate",
    }, {
        title: "待还款",
        dataIndex: "pendingRepayment",
        key: "pendingRepayment",
    }, {
        title: "操作",
        dataIndex: "action",
        key: "action",
    }
]

export const borrowingDetailsCol = [
    {
        title: "币种",
        dataIndex: "currency",
        key: "currency",
    }, {
        title: "市场",
        dataIndex: "market",
        key: "market",
    }, {
        title: "时间",
        dataIndex: "time",
        key: "time",
    }, {
        title: "类型",
        dataIndex: "type",
        key: "type",
    }, {
        title: "数量",
        dataIndex: "number",
        key: "number",
    }
]